﻿"use strict";

angular.module('ecMenu').directive('ecMenu',
    function () {
        return {
            transclude: true,
            link: function(scope, el, attr){
                var o = $.AdminLTE.options;

                //Activate the layout maker
                $.AdminLTE.layout.activate();

                //Enable sidebar tree view controls
                $.AdminLTE.tree('.sidebar');

                //Activate sidebar push menu
                if (o.sidebarPushMenu) {
                    $.AdminLTE.pushMenu(o.sidebarToggleSelector);
                }
            },
            controller: 'ecMenuController',
            templateUrl: '/ext-modules/ecMenu/ecMenuTemplate.html'
        };
    });